package com.yx.modules.api.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.yx.modules.api.entity.TbUser;
import com.yx.system.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface TbUserMapper extends BaseMapper<TbUser> {

    int deleteByPrimaryKey(Long userId);

    @Override
    Integer insert(TbUser record);

    int insertSelective(TbUser record);

    TbUser selectByPrimaryKey(Long userId);

    int updateByPrimaryKeySelective(TbUser record);

    int updateByPrimaryKey(TbUser record);

    TbUser queryByMobile(String mobile);

    TbUser queryByUid(String value);

    TbUser queryWBBangd(String wbtoken,String wbopenid);

    TbUser queryQQBangd(String qqtoken,String qqopenid);

    List<TbUser> queryPageList(Page<TbUser> pageUtil, Map<String, Object> map);

    /**
     * 查询用户列表
     */
    List<TbUser> queryList(Map<String, Object> map);

    TbUser findByAuthor(@Param("uuid") String authorId);
}